<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>OCILIB (C and C++ Driver for Oracle): Database Change notifications (DCN or CQN)</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">OCILIB (C and C++ Driver for Oracle)
   &#160;<span id="projectnumber">4.2.1</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>About</span></a></li>
      <li><a href="modules.html"><span>Documentation</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group___ocilib_c_api_subscriptions.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Database Change notifications (DCN or CQN)<div class="ingroups"><a class="el" href="group___ocilib_c_api.html">C API</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>OCILIB supports Oracle 10gR2 feature Database Change Notifications (DCN) also named Continuous Query Notifications (CQN)</p>
<p>This features allows a client application to register notifications when some changes are made in a database :</p><ul>
<li>Database status changes : startup and shutdown</li>
<li>Database objects changes :<ul>
<li>DDL changes : alter or drop actions</li>
<li>DML changes : insert, delete, update actions</li>
</ul>
</li>
</ul>
<p>This feature can be really useful in applications that hold a cache of data. Instead of refreshing data periodically by connecting to the server, the application could only refresh modified data when necessary or perform specific tasks depending on the events. It saves application time, network traffic and can help the design of the application logic.</p>
<p>The database status change notification is also interesting to be informed of instance startup / shutdown</p>
<p>Check Oracle documentation for more details about this feature</p>
<dl class="section note"><dt>Note</dt><dd>No active database connection is required to receive the notifications as they are handled by the Oracle client using a dedicated socket connection to the server</dd></dl>
<dl class="section user"><dt>Database changes</dt><dd></dd></dl>
<p>The client application can be notified of any database status change (single DB or multiple DB in a RAC environment).</p>
<dl class="section user"><dt>Object changes</dt><dd></dd></dl>
<p>The notifications of object changes are based on the registration of a query ('select' SQL statement).</p>
<p>Oracle server will notify of any changes of any object that is part of the statement result set.</p>
<p>Registering a statement will notify about any changes on its result set rows performed after the registration of the query.</p>
<p>The query can be a simple 'select * from table' or a complex query involving many tables and/or criteria in the where clause.</p>
<p>For Object changes, the notification can be at :</p><ul>
<li>At Object level : only the object name (schema + object) is given</li>
<li>At row level : same that object level + RowID of the altered row</li>
</ul>
<dl class="section warning"><dt>Warning</dt><dd>Trying to use this features with a client/server version &lt; 10gR2 will raise an error</dd></dl>
<dl class="section user"><dt>Example</dt><dd><div class="fragment"><div class="line"><span class="preprocessor">#include &quot;ocilib.h&quot;</span></div>
<div class="line"></div>
<div class="line"><span class="preprocessor">#ifdef _WINDOWS</span></div>
<div class="line"><span class="preprocessor">  #define sleep(x) Sleep(x*1000)</span></div>
<div class="line"><span class="preprocessor">#endif</span></div>
<div class="line"></div>
<div class="line"><span class="preprocessor">#define wait_for_events() sleep(5)</span></div>
<div class="line"></div>
<div class="line"><span class="keywordtype">void</span> event_handler(<a class="code" href="group___ocilib_c_api_datatypes.html#gadb8a12f3997bef6dc932e75f728efbb7">OCI_Event</a> *event);</div>
<div class="line"><span class="keywordtype">void</span> error_handler(<a class="code" href="group___ocilib_c_api_datatypes.html#ga8234ab7e71027fd7d139288b2181d4a7">OCI_Error</a> *err);</div>
<div class="line"></div>
<div class="line"><span class="keywordtype">int</span> main(<span class="keywordtype">void</span>)</div>
<div class="line">{</div>
<div class="line">    <a class="code" href="group___ocilib_c_api_datatypes.html#ga2135d3b5341ebbaae1f54d62873ecf77">OCI_Connection</a>   *con;</div>
<div class="line">    <a class="code" href="group___ocilib_c_api_datatypes.html#gae28da488be3fc9bbf5ee3cc368b93be4">OCI_Subscription</a> *sub;</div>
<div class="line">    <a class="code" href="group___ocilib_c_api_datatypes.html#ga4b016f1bd7de508b1a919e34b12aa83d">OCI_Statement</a>    *st;</div>
<div class="line"> </div>
<div class="line">    printf(<span class="stringliteral">&quot;=&gt; Initializing OCILIB in event mode...\n\n&quot;</span>);</div>
<div class="line"></div>
<div class="line">    <span class="keywordflow">if</span> (!<a class="code" href="group___ocilib_c_api_initialization.html#ga01464863ddd68393106b63fb8cc1ead1">OCI_Initialize</a>(error_handler, NULL, OCI_ENV_EVENTS))</div>
<div class="line">        <span class="keywordflow">return</span> EXIT_FAILURE;</div>
<div class="line"></div>
<div class="line">    printf(<span class="stringliteral">&quot;=&gt; Connecting to usr@db...\n\n&quot;</span>);</div>
<div class="line"></div>
<div class="line">    con = <a class="code" href="group___ocilib_c_api_connections.html#ga5cd867ad94bdc4a3bbfdef24452262e0">OCI_ConnectionCreate</a>(<span class="stringliteral">&quot;db&quot;</span>, <span class="stringliteral">&quot;usr&quot;</span>, <span class="stringliteral">&quot;pwd&quot;</span>, OCI_SESSION_DEFAULT);</div>
<div class="line">    </div>
<div class="line">    <a class="code" href="group___ocilib_c_api_transactions.html#ga8a21e8ab3893ae71ff8d8f6c9795566d">OCI_SetAutoCommit</a>(con, TRUE);</div>
<div class="line"> </div>
<div class="line">    printf(<span class="stringliteral">&quot;=&gt; Creating statement...\n\n&quot;</span>);</div>
<div class="line"></div>
<div class="line">    st  = <a class="code" href="group___ocilib_c_api_statements.html#ga335822f983af0fb5c529431f06a9a17b">OCI_StatementCreate</a>(con);</div>
<div class="line"></div>
<div class="line">    printf(<span class="stringliteral">&quot;=&gt; Creating tables...\n\n&quot;</span>);</div>
<div class="line"></div>
<div class="line">    <a class="code" href="group___ocilib_c_api_statements.html#ga8b2b66994f847d9f0b6b0efe4a13ccf3">OCI_ExecuteStmt</a>(st, <span class="stringliteral">&quot;create table table1(code number)&quot;</span>);</div>
<div class="line">    <a class="code" href="group___ocilib_c_api_statements.html#ga8b2b66994f847d9f0b6b0efe4a13ccf3">OCI_ExecuteStmt</a>(st, <span class="stringliteral">&quot;create table table2(str varchar2(10))&quot;</span>);</div>
<div class="line"></div>
<div class="line">    printf(<span class="stringliteral">&quot;=&gt; Registering subscription...\n\n&quot;</span>);</div>
<div class="line"></div>
<div class="line">    sub = <a class="code" href="group___ocilib_c_api_subscriptions.html#ga78afd31aa61d0ce04c535cd669e58e07">OCI_SubscriptionRegister</a>(con, <span class="stringliteral">&quot;sub-00&quot;</span>, OCI_CNT_ALL, event_handler, 5468, 0);</div>
<div class="line"></div>
<div class="line">    printf(<span class="stringliteral">&quot;=&gt; Adding queries to be notified...\n\n&quot;</span>);</div>
<div class="line"></div>
<div class="line">    <a class="code" href="group___ocilib_c_api_statements.html#ga592e4b3cf3df7e152c46fab5d6e3b3af">OCI_Prepare</a>(st, <span class="stringliteral">&quot;select * from table1&quot;</span>);</div>
<div class="line">    <a class="code" href="group___ocilib_c_api_subscriptions.html#ga5e21132d60056afa78348f380bacf702">OCI_SubscriptionAddStatement</a>(sub, st);</div>
<div class="line"></div>
<div class="line">    <a class="code" href="group___ocilib_c_api_statements.html#ga592e4b3cf3df7e152c46fab5d6e3b3af">OCI_Prepare</a>(st, <span class="stringliteral">&quot;select * from table2&quot;</span>);</div>
<div class="line">    <a class="code" href="group___ocilib_c_api_subscriptions.html#ga5e21132d60056afa78348f380bacf702">OCI_SubscriptionAddStatement</a>(sub, st);</div>
<div class="line"></div>
<div class="line">    printf(<span class="stringliteral">&quot;=&gt; Executing some DDL operation...\n\n&quot;</span>);</div>
<div class="line"></div>
<div class="line">    <a class="code" href="group___ocilib_c_api_statements.html#ga8b2b66994f847d9f0b6b0efe4a13ccf3">OCI_ExecuteStmt</a>(st, <span class="stringliteral">&quot;alter table table1 add price number&quot;</span>);</div>
<div class="line"></div>
<div class="line">    wait_for_events();</div>
<div class="line"> </div>
<div class="line">    printf(<span class="stringliteral">&quot;=&gt; Executing some DML operation...\n\n&quot;</span>);</div>
<div class="line"></div>
<div class="line">    <a class="code" href="group___ocilib_c_api_statements.html#ga8b2b66994f847d9f0b6b0efe4a13ccf3">OCI_ExecuteStmt</a>(st, <span class="stringliteral">&quot;insert into table1 values(1, 10.5)&quot;</span>);</div>
<div class="line">    <a class="code" href="group___ocilib_c_api_statements.html#ga8b2b66994f847d9f0b6b0efe4a13ccf3">OCI_ExecuteStmt</a>(st, <span class="stringliteral">&quot;insert into table2 values(&#39;shoes&#39;)&quot;</span>);</div>
<div class="line"></div>
<div class="line">    <a class="code" href="group___ocilib_c_api_statements.html#ga8b2b66994f847d9f0b6b0efe4a13ccf3">OCI_ExecuteStmt</a>(st, <span class="stringliteral">&quot;update table1 set price = 13.5 where code = 1&quot;</span>);</div>
<div class="line">    <a class="code" href="group___ocilib_c_api_statements.html#ga8b2b66994f847d9f0b6b0efe4a13ccf3">OCI_ExecuteStmt</a>(st, <span class="stringliteral">&quot;delete from table2 &quot;</span>);</div>
<div class="line"></div>
<div class="line">    wait_for_events();</div>
<div class="line"></div>
<div class="line">    printf(<span class="stringliteral">&quot;=&gt; Droping tables...\n\n&quot;</span>);</div>
<div class="line"></div>
<div class="line">    <a class="code" href="group___ocilib_c_api_statements.html#ga8b2b66994f847d9f0b6b0efe4a13ccf3">OCI_ExecuteStmt</a>(st, <span class="stringliteral">&quot;drop table table1&quot;</span>);</div>
<div class="line">    <a class="code" href="group___ocilib_c_api_statements.html#ga8b2b66994f847d9f0b6b0efe4a13ccf3">OCI_ExecuteStmt</a>(st, <span class="stringliteral">&quot;drop table table2&quot;</span>);</div>
<div class="line"></div>
<div class="line">    wait_for_events();</div>
<div class="line"></div>
<div class="line">    printf(<span class="stringliteral">&quot;=&gt; Disconnecting from DB...\n\n&quot;</span>);</div>
<div class="line"></div>
<div class="line">    <a class="code" href="group___ocilib_c_api_connections.html#gac3fe655e96074adb119908be4650a4c9">OCI_ConnectionFree</a>(con);</div>
<div class="line"></div>
<div class="line">    printf(<span class="stringliteral">&quot;=&gt; Stopping the remote database...\n\n&quot;</span>);</div>
<div class="line"></div>
<div class="line">    <a class="code" href="group___ocilib_c_api_instances_management.html#ga6c4b72e7ad5c87691fdecca573dca41b">OCI_DatabaseShutdown</a>(<span class="stringliteral">&quot;db&quot;</span>, <span class="stringliteral">&quot;sys&quot;</span>, <span class="stringliteral">&quot;sys&quot;</span>,   </div>
<div class="line">                         OCI_SESSION_SYSDBA,</div>
<div class="line">                         OCI_DB_SDM_FULL,</div>
<div class="line">                         OCI_DB_SDF_IMMEDIATE);</div>
<div class="line"></div>
<div class="line">    wait_for_events();;</div>
<div class="line"></div>
<div class="line">    printf(<span class="stringliteral">&quot;=&gt; Starting the remote database...\n\n&quot;</span>);</div>
<div class="line"></div>
<div class="line">    <a class="code" href="group___ocilib_c_api_instances_management.html#ga1f7f4e4a1f7f32d70296281546276ce5">OCI_DatabaseStartup</a>(<span class="stringliteral">&quot;db&quot;</span>, <span class="stringliteral">&quot;sys&quot;</span>, <span class="stringliteral">&quot;sys&quot;</span>,   </div>
<div class="line">                         OCI_SESSION_SYSDBA,</div>
<div class="line">                         OCI_DB_SPM_FULL,</div>
<div class="line">                         OCI_DB_SPF_FORCE,</div>
<div class="line">                         NULL);</div>
<div class="line"></div>
<div class="line">    wait_for_events();</div>
<div class="line"></div>
<div class="line">    printf(<span class="stringliteral">&quot;=&gt; Unregistering subscription...\n\n&quot;</span>);</div>
<div class="line"></div>
<div class="line">    <a class="code" href="group___ocilib_c_api_subscriptions.html#gaee7e14ee05f2368b4843aaf61d284341">OCI_SubscriptionUnregister</a>(sub);</div>
<div class="line"></div>
<div class="line">    printf(<span class="stringliteral">&quot;=&gt; Cleaning up OCILIB resources...\n\n&quot;</span>);</div>
<div class="line"></div>
<div class="line">    <a class="code" href="group___ocilib_c_api_initialization.html#ga639706aa8e9689c7ebffc018fac6d3ae">OCI_Cleanup</a>();</div>
<div class="line"></div>
<div class="line">    printf(<span class="stringliteral">&quot;=&gt; Done...\n\n&quot;</span>);</div>
<div class="line"></div>
<div class="line">    <span class="keywordflow">return</span> EXIT_SUCCESS;</div>
<div class="line">}</div>
<div class="line"></div>
<div class="line"><span class="keywordtype">void</span> error_handler(<a class="code" href="group___ocilib_c_api_datatypes.html#ga8234ab7e71027fd7d139288b2181d4a7">OCI_Error</a> *err)</div>
<div class="line">{</div>
<div class="line">    <span class="keywordtype">int</span>         err_type = <a class="code" href="group___ocilib_c_api_error_handling.html#ga66d447c8cd06ea3f841b439a1aac055b">OCI_ErrorGetType</a>(err);</div>
<div class="line">    <span class="keyword">const</span> <span class="keywordtype">char</span> *err_msg  = <a class="code" href="group___ocilib_c_api_error_handling.html#ga661d5229057b291ef25bb344315f7c38">OCI_ErrorGetString</a>(err);</div>
<div class="line"></div>
<div class="line">    printf(<span class="stringliteral">&quot;** %s - %s\n&quot;</span>, err_type == OCI_ERR_WARNING ? <span class="stringliteral">&quot;Warning&quot;</span> : <span class="stringliteral">&quot;Error&quot;</span>, err_msg);</div>
<div class="line">}</div>
<div class="line"></div>
<div class="line"><span class="keywordtype">void</span> event_handler(<a class="code" href="group___ocilib_c_api_datatypes.html#gadb8a12f3997bef6dc932e75f728efbb7">OCI_Event</a> *event)</div>
<div class="line">{</div>
<div class="line">    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> type     = <a class="code" href="group___ocilib_c_api_subscriptions.html#ga0f5fb0fdd972f5d09a6745b05706ff0f">OCI_EventGetType</a>(event);</div>
<div class="line">    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> op       = <a class="code" href="group___ocilib_c_api_subscriptions.html#ga0bc0106ab06c682f77dd763733573a7d">OCI_EventGetOperation</a>(event);</div>
<div class="line">    <a class="code" href="group___ocilib_c_api_datatypes.html#gae28da488be3fc9bbf5ee3cc368b93be4">OCI_Subscription</a> *sub = <a class="code" href="group___ocilib_c_api_subscriptions.html#ga6a8667ed40a4be1eb47b1a0552791407">OCI_EventGetSubscription</a>(event);</div>
<div class="line"></div>
<div class="line">    printf(<span class="stringliteral">&quot;** Notification      : %s\n\n&quot;</span>, <a class="code" href="group___ocilib_c_api_subscriptions.html#ga9266ae54a6e23a280cb6a34fa90bf81a">OCI_SubscriptionGetName</a>(sub));</div>
<div class="line">    printf(<span class="stringliteral">&quot;...... Database      : %s\n&quot;</span>,   <a class="code" href="group___ocilib_c_api_subscriptions.html#ga3a82c0dc1d0d69506087b81bc717c60c">OCI_EventGetDatabase</a>(event));</div>
<div class="line"></div>
<div class="line">    <span class="keywordflow">switch</span> (type)</div>
<div class="line">    {</div>
<div class="line">        <span class="keywordflow">case</span> OCI_ENT_STARTUP:</div>
<div class="line">            printf(<span class="stringliteral">&quot;...... Event         : Startup\n&quot;</span>);</div>
<div class="line">            <span class="keywordflow">break</span>;</div>
<div class="line">        <span class="keywordflow">case</span> OCI_ENT_SHUTDOWN:</div>
<div class="line">            printf(<span class="stringliteral">&quot;...... Event         : Shutdown\n&quot;</span>);</div>
<div class="line">            <span class="keywordflow">break</span>;</div>
<div class="line">        <span class="keywordflow">case</span> OCI_ENT_SHUTDOWN_ANY:</div>
<div class="line">            printf(<span class="stringliteral">&quot;...... Event         : Shutdown any\n&quot;</span>);</div>
<div class="line">            <span class="keywordflow">break</span>;</div>
<div class="line">        <span class="keywordflow">case</span> OCI_ENT_DROP_DATABASE:</div>
<div class="line">            printf(<span class="stringliteral">&quot;...... Event         : drop database\n&quot;</span>);</div>
<div class="line">            <span class="keywordflow">break</span>;</div>
<div class="line">        <span class="keywordflow">case</span> OCI_ENT_DEREGISTER:</div>
<div class="line">            printf(<span class="stringliteral">&quot;...... Event         : deregister\n&quot;</span>);</div>
<div class="line">            <span class="keywordflow">break</span>;</div>
<div class="line">         <span class="keywordflow">case</span> OCI_ENT_OBJECT_CHANGED:</div>
<div class="line">            </div>
<div class="line">            printf(<span class="stringliteral">&quot;...... Event         : object changed\n&quot;</span>);</div>
<div class="line">            printf(<span class="stringliteral">&quot;........... Object   : %s\n&quot;</span>, <a class="code" href="group___ocilib_c_api_subscriptions.html#gab2986bcdd9e4e10996bec5f7767776ec">OCI_EventGetObject</a>(event));</div>
<div class="line">      </div>
<div class="line">            <span class="keywordflow">switch</span> (op)</div>
<div class="line">            {</div>
<div class="line">                <span class="keywordflow">case</span> OCI_ONT_INSERT:</div>
<div class="line">                    printf(<span class="stringliteral">&quot;........... Action   : insert\n&quot;</span>);</div>
<div class="line">                    <span class="keywordflow">break</span>;</div>
<div class="line">                <span class="keywordflow">case</span> OCI_ONT_UPDATE:</div>
<div class="line">                    printf(<span class="stringliteral">&quot;........... Action   : update\n&quot;</span>);</div>
<div class="line">                    <span class="keywordflow">break</span>;</div>
<div class="line">                <span class="keywordflow">case</span> OCI_ONT_DELETE:</div>
<div class="line">                    printf(<span class="stringliteral">&quot;........... Action   : delete\n&quot;</span>);</div>
<div class="line">                    <span class="keywordflow">break</span>;</div>
<div class="line">                <span class="keywordflow">case</span> OCI_ONT_ALTER:</div>
<div class="line">                    printf(<span class="stringliteral">&quot;........... Action   : alter\n&quot;</span>);</div>
<div class="line">                    <span class="keywordflow">break</span>;</div>
<div class="line">                <span class="keywordflow">case</span> OCI_ONT_DROP:</div>
<div class="line">                    printf(<span class="stringliteral">&quot;........... Action   : drop\n&quot;</span>);</div>
<div class="line">                    <span class="keywordflow">break</span>;</div>
<div class="line">            }</div>
<div class="line">                    </div>
<div class="line">            <span class="keywordflow">if</span> (op &lt; OCI_ONT_ALTER)</div>
<div class="line">                printf(<span class="stringliteral">&quot;........... Rowid    : %s\n&quot;</span>,  <a class="code" href="group___ocilib_c_api_subscriptions.html#gaef9f191c3e55ce652953da82d7cb0d75">OCI_EventGetRowid</a>(event));</div>
<div class="line">        </div>
<div class="line">            <span class="keywordflow">break</span>;</div>
<div class="line">    }</div>
<div class="line">    </div>
<div class="line">    printf(<span class="stringliteral">&quot;\n&quot;</span>);</div>
<div class="line">}</div>
</div><!-- fragment --> </dd></dl>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga78afd31aa61d0ce04c535cd669e58e07"><td class="memItemLeft" align="right" valign="top">OCI_EXPORT <a class="el" href="group___ocilib_c_api_datatypes.html#gae28da488be3fc9bbf5ee3cc368b93be4">OCI_Subscription</a> *OCI_API&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___ocilib_c_api_subscriptions.html#ga78afd31aa61d0ce04c535cd669e58e07">OCI_SubscriptionRegister</a> (<a class="el" href="group___ocilib_c_api_datatypes.html#ga2135d3b5341ebbaae1f54d62873ecf77">OCI_Connection</a> *con, const otext *name, unsigned int type, <a class="el" href="group___ocilib_c_api_datatypes.html#ga6eed7878852e796a705f452bad294fd2">POCI_NOTIFY</a> handler, unsigned int port, unsigned int timeout)</td></tr>
<tr class="memdesc:ga78afd31aa61d0ce04c535cd669e58e07"><td class="mdescLeft">&#160;</td><td class="mdescRight">Register a notification against the given database.  <a href="#ga78afd31aa61d0ce04c535cd669e58e07">More...</a><br /></td></tr>
<tr class="separator:ga78afd31aa61d0ce04c535cd669e58e07"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaee7e14ee05f2368b4843aaf61d284341"><td class="memItemLeft" align="right" valign="top">OCI_EXPORT boolean OCI_API&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___ocilib_c_api_subscriptions.html#gaee7e14ee05f2368b4843aaf61d284341">OCI_SubscriptionUnregister</a> (<a class="el" href="group___ocilib_c_api_datatypes.html#gae28da488be3fc9bbf5ee3cc368b93be4">OCI_Subscription</a> *sub)</td></tr>
<tr class="memdesc:gaee7e14ee05f2368b4843aaf61d284341"><td class="mdescLeft">&#160;</td><td class="mdescRight">Unregister a previously registered notification.  <a href="#gaee7e14ee05f2368b4843aaf61d284341">More...</a><br /></td></tr>
<tr class="separator:gaee7e14ee05f2368b4843aaf61d284341"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5e21132d60056afa78348f380bacf702"><td class="memItemLeft" align="right" valign="top">OCI_EXPORT boolean OCI_API&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___ocilib_c_api_subscriptions.html#ga5e21132d60056afa78348f380bacf702">OCI_SubscriptionAddStatement</a> (<a class="el" href="group___ocilib_c_api_datatypes.html#gae28da488be3fc9bbf5ee3cc368b93be4">OCI_Subscription</a> *sub, <a class="el" href="group___ocilib_c_api_datatypes.html#ga4b016f1bd7de508b1a919e34b12aa83d">OCI_Statement</a> *stmt)</td></tr>
<tr class="memdesc:ga5e21132d60056afa78348f380bacf702"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a statement to the notification to monitor.  <a href="#ga5e21132d60056afa78348f380bacf702">More...</a><br /></td></tr>
<tr class="separator:ga5e21132d60056afa78348f380bacf702"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9266ae54a6e23a280cb6a34fa90bf81a"><td class="memItemLeft" align="right" valign="top">OCI_EXPORT const otext *OCI_API&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___ocilib_c_api_subscriptions.html#ga9266ae54a6e23a280cb6a34fa90bf81a">OCI_SubscriptionGetName</a> (<a class="el" href="group___ocilib_c_api_datatypes.html#gae28da488be3fc9bbf5ee3cc368b93be4">OCI_Subscription</a> *sub)</td></tr>
<tr class="memdesc:ga9266ae54a6e23a280cb6a34fa90bf81a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the name of the given registered subscription.  <a href="#ga9266ae54a6e23a280cb6a34fa90bf81a">More...</a><br /></td></tr>
<tr class="separator:ga9266ae54a6e23a280cb6a34fa90bf81a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaac2b2c3f7bc5e07f230cb4f797f95e8c"><td class="memItemLeft" align="right" valign="top">OCI_EXPORT unsigned int OCI_API&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___ocilib_c_api_subscriptions.html#gaac2b2c3f7bc5e07f230cb4f797f95e8c">OCI_SubscriptionGetPort</a> (<a class="el" href="group___ocilib_c_api_datatypes.html#gae28da488be3fc9bbf5ee3cc368b93be4">OCI_Subscription</a> *sub)</td></tr>
<tr class="memdesc:gaac2b2c3f7bc5e07f230cb4f797f95e8c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the port used by the notification.  <a href="#gaac2b2c3f7bc5e07f230cb4f797f95e8c">More...</a><br /></td></tr>
<tr class="separator:gaac2b2c3f7bc5e07f230cb4f797f95e8c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga56fb04b8fe1cf961dbab6ee90b3362ca"><td class="memItemLeft" align="right" valign="top">OCI_EXPORT unsigned int OCI_API&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___ocilib_c_api_subscriptions.html#ga56fb04b8fe1cf961dbab6ee90b3362ca">OCI_SubscriptionGetTimeout</a> (<a class="el" href="group___ocilib_c_api_datatypes.html#gae28da488be3fc9bbf5ee3cc368b93be4">OCI_Subscription</a> *sub)</td></tr>
<tr class="memdesc:ga56fb04b8fe1cf961dbab6ee90b3362ca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the timeout of the given registered subscription.  <a href="#ga56fb04b8fe1cf961dbab6ee90b3362ca">More...</a><br /></td></tr>
<tr class="separator:ga56fb04b8fe1cf961dbab6ee90b3362ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga748e045e9c97b31e83cd52926ba62509"><td class="memItemLeft" align="right" valign="top">OCI_EXPORT <a class="el" href="group___ocilib_c_api_datatypes.html#ga2135d3b5341ebbaae1f54d62873ecf77">OCI_Connection</a> *OCI_API&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___ocilib_c_api_subscriptions.html#ga748e045e9c97b31e83cd52926ba62509">OCI_SubscriptionGetConnection</a> (<a class="el" href="group___ocilib_c_api_datatypes.html#gae28da488be3fc9bbf5ee3cc368b93be4">OCI_Subscription</a> *sub)</td></tr>
<tr class="memdesc:ga748e045e9c97b31e83cd52926ba62509"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the connection handle associated with a subscription handle.  <a href="#ga748e045e9c97b31e83cd52926ba62509">More...</a><br /></td></tr>
<tr class="separator:ga748e045e9c97b31e83cd52926ba62509"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0f5fb0fdd972f5d09a6745b05706ff0f"><td class="memItemLeft" align="right" valign="top">OCI_EXPORT unsigned int OCI_API&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___ocilib_c_api_subscriptions.html#ga0f5fb0fdd972f5d09a6745b05706ff0f">OCI_EventGetType</a> (<a class="el" href="group___ocilib_c_api_datatypes.html#gadb8a12f3997bef6dc932e75f728efbb7">OCI_Event</a> *event)</td></tr>
<tr class="memdesc:ga0f5fb0fdd972f5d09a6745b05706ff0f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the type of event reported by a notification.  <a href="#ga0f5fb0fdd972f5d09a6745b05706ff0f">More...</a><br /></td></tr>
<tr class="separator:ga0f5fb0fdd972f5d09a6745b05706ff0f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0bc0106ab06c682f77dd763733573a7d"><td class="memItemLeft" align="right" valign="top">OCI_EXPORT unsigned int OCI_API&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___ocilib_c_api_subscriptions.html#ga0bc0106ab06c682f77dd763733573a7d">OCI_EventGetOperation</a> (<a class="el" href="group___ocilib_c_api_datatypes.html#gadb8a12f3997bef6dc932e75f728efbb7">OCI_Event</a> *event)</td></tr>
<tr class="memdesc:ga0bc0106ab06c682f77dd763733573a7d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the type of operation reported by a notification.  <a href="#ga0bc0106ab06c682f77dd763733573a7d">More...</a><br /></td></tr>
<tr class="separator:ga0bc0106ab06c682f77dd763733573a7d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3a82c0dc1d0d69506087b81bc717c60c"><td class="memItemLeft" align="right" valign="top">OCI_EXPORT const otext *OCI_API&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___ocilib_c_api_subscriptions.html#ga3a82c0dc1d0d69506087b81bc717c60c">OCI_EventGetDatabase</a> (<a class="el" href="group___ocilib_c_api_datatypes.html#gadb8a12f3997bef6dc932e75f728efbb7">OCI_Event</a> *event)</td></tr>
<tr class="memdesc:ga3a82c0dc1d0d69506087b81bc717c60c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the name of the database that generated the event.  <a href="#ga3a82c0dc1d0d69506087b81bc717c60c">More...</a><br /></td></tr>
<tr class="separator:ga3a82c0dc1d0d69506087b81bc717c60c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab2986bcdd9e4e10996bec5f7767776ec"><td class="memItemLeft" align="right" valign="top">OCI_EXPORT const otext *OCI_API&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___ocilib_c_api_subscriptions.html#gab2986bcdd9e4e10996bec5f7767776ec">OCI_EventGetObject</a> (<a class="el" href="group___ocilib_c_api_datatypes.html#gadb8a12f3997bef6dc932e75f728efbb7">OCI_Event</a> *event)</td></tr>
<tr class="memdesc:gab2986bcdd9e4e10996bec5f7767776ec"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the name of the object that generated the event.  <a href="#gab2986bcdd9e4e10996bec5f7767776ec">More...</a><br /></td></tr>
<tr class="separator:gab2986bcdd9e4e10996bec5f7767776ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaef9f191c3e55ce652953da82d7cb0d75"><td class="memItemLeft" align="right" valign="top">OCI_EXPORT const otext *OCI_API&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___ocilib_c_api_subscriptions.html#gaef9f191c3e55ce652953da82d7cb0d75">OCI_EventGetRowid</a> (<a class="el" href="group___ocilib_c_api_datatypes.html#gadb8a12f3997bef6dc932e75f728efbb7">OCI_Event</a> *event)</td></tr>
<tr class="memdesc:gaef9f191c3e55ce652953da82d7cb0d75"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the rowid of the altered database object row.  <a href="#gaef9f191c3e55ce652953da82d7cb0d75">More...</a><br /></td></tr>
<tr class="separator:gaef9f191c3e55ce652953da82d7cb0d75"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6a8667ed40a4be1eb47b1a0552791407"><td class="memItemLeft" align="right" valign="top">OCI_EXPORT <a class="el" href="group___ocilib_c_api_datatypes.html#gae28da488be3fc9bbf5ee3cc368b93be4">OCI_Subscription</a> *OCI_API&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___ocilib_c_api_subscriptions.html#ga6a8667ed40a4be1eb47b1a0552791407">OCI_EventGetSubscription</a> (<a class="el" href="group___ocilib_c_api_datatypes.html#gadb8a12f3997bef6dc932e75f728efbb7">OCI_Event</a> *event)</td></tr>
<tr class="memdesc:ga6a8667ed40a4be1eb47b1a0552791407"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the subscription handle that generated this event.  <a href="#ga6a8667ed40a4be1eb47b1a0552791407">More...</a><br /></td></tr>
<tr class="separator:ga6a8667ed40a4be1eb47b1a0552791407"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga78afd31aa61d0ce04c535cd669e58e07"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">OCI_EXPORT <a class="el" href="group___ocilib_c_api_datatypes.html#gae28da488be3fc9bbf5ee3cc368b93be4">OCI_Subscription</a>* OCI_API OCI_SubscriptionRegister </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___ocilib_c_api_datatypes.html#ga2135d3b5341ebbaae1f54d62873ecf77">OCI_Connection</a> *&#160;</td>
          <td class="paramname"><em>con</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const otext *&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group___ocilib_c_api_datatypes.html#ga6eed7878852e796a705f452bad294fd2">POCI_NOTIFY</a>&#160;</td>
          <td class="paramname"><em>handler</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>port</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>timeout</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>#include &lt;ocilib.h&gt;</code></p>

<p>Register a notification against the given database. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">con</td><td>- Connection handle </td></tr>
    <tr><td class="paramname">name</td><td>- Notification name </td></tr>
    <tr><td class="paramname">type</td><td>- Subscription type </td></tr>
    <tr><td class="paramname">handler</td><td>- User handler callback </td></tr>
    <tr><td class="paramname">port</td><td>- Port to use for notifications </td></tr>
    <tr><td class="paramname">timeout</td><td>- notification timeout</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>Parameter 'type' can be one of the following values :</dd></dl>
<ul>
<li>OCI_CNT_OBJECTS : request for changes at objects (e.g. tables) level (DDL / DML)</li>
<li>OCI_CNT_ROWS : request for changes at rows level (DML)</li>
<li>OCI_CNT_DATABASES : request for changes at database level (startup, shutdown)</li>
<li>OCI_CNT_ALL : request for all changes</li>
</ul>
<dl class="section note"><dt>Note</dt><dd>OCI_ENV_EVENTS flag must be passed to <a class="el" href="group___ocilib_c_api_initialization.html#ga01464863ddd68393106b63fb8cc1ead1" title="Initialize the library. ">OCI_Initialize()</a> to be able to use subscriptions</dd>
<dd>
Requires Oracle Client 10gR2 or above</dd>
<dd>
Subscription handles are automatically managed by the library</dd></dl>
<dl class="section return"><dt>Returns</dt><dd>Subscription handle on success or NULL on failure </dd></dl>

<p>Referenced by <a class="el" href="classocilib_1_1_subscription.html#a44f8bca8a9479fe38dde565890850389">ocilib::Subscription::Register()</a>.</p>

</div>
</div>
<a class="anchor" id="gaee7e14ee05f2368b4843aaf61d284341"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">OCI_EXPORT boolean OCI_API OCI_SubscriptionUnregister </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___ocilib_c_api_datatypes.html#gae28da488be3fc9bbf5ee3cc368b93be4">OCI_Subscription</a> *&#160;</td>
          <td class="paramname"><em>sub</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>#include &lt;ocilib.h&gt;</code></p>

<p>Unregister a previously registered notification. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sub</td><td>- Subscription handle</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd><a class="el" href="group___ocilib_c_api_initialization.html#ga639706aa8e9689c7ebffc018fac6d3ae" title="Clean up all resources allocated by the library. ">OCI_Cleanup()</a> will automatically unregister any registered subscriptions</dd>
<dd>
If the database connection passed to <a class="el" href="group___ocilib_c_api_subscriptions.html#ga78afd31aa61d0ce04c535cd669e58e07" title="Register a notification against the given database. ">OCI_SubscriptionRegister()</a> has been closed by the time that the application calls OCI_SubscriptionUnregister, the library internally reconnects to the given database, performs the unregistration and then disconnects</dd>
<dd>
OCI_ENV_EVENTS flag must be passed to <a class="el" href="group___ocilib_c_api_initialization.html#ga01464863ddd68393106b63fb8cc1ead1" title="Initialize the library. ">OCI_Initialize()</a> to be able to use subscriptions</dd></dl>
<dl class="section return"><dt>Returns</dt><dd>TRUE on success otherwise FALSE </dd></dl>

<p>Referenced by <a class="el" href="classocilib_1_1_subscription.html#a44f8bca8a9479fe38dde565890850389">ocilib::Subscription::Register()</a>.</p>

</div>
</div>
<a class="anchor" id="ga5e21132d60056afa78348f380bacf702"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">OCI_EXPORT boolean OCI_API OCI_SubscriptionAddStatement </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___ocilib_c_api_datatypes.html#gae28da488be3fc9bbf5ee3cc368b93be4">OCI_Subscription</a> *&#160;</td>
          <td class="paramname"><em>sub</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group___ocilib_c_api_datatypes.html#ga4b016f1bd7de508b1a919e34b12aa83d">OCI_Statement</a> *&#160;</td>
          <td class="paramname"><em>stmt</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>#include &lt;ocilib.h&gt;</code></p>

<p>Add a statement to the notification to monitor. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sub</td><td>- Subscription handle </td></tr>
    <tr><td class="paramname">stmt</td><td>- Statement handle</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>The given statement must be prepared but not executed before being passed to this function. <a class="el" href="group___ocilib_c_api_subscriptions.html#ga5e21132d60056afa78348f380bacf702" title="Add a statement to the notification to monitor. ">OCI_SubscriptionAddStatement()</a> executes the statement and register it for notifications</dd>
<dd>
OCI_ENV_EVENTS flag must be passed to <a class="el" href="group___ocilib_c_api_initialization.html#ga01464863ddd68393106b63fb8cc1ead1" title="Initialize the library. ">OCI_Initialize()</a> to be able to use subscriptions</dd>
<dd>
The given statement must hold a 'SELECT' SQL statement</dd></dl>
<dl class="section return"><dt>Returns</dt><dd>TRUE on success otherwise FALSE </dd></dl>

<p>Referenced by <a class="el" href="classocilib_1_1_subscription.html#a0bbced3f0c3111880bff1d9f8b607a38">ocilib::Subscription::Watch()</a>.</p>

</div>
</div>
<a class="anchor" id="ga9266ae54a6e23a280cb6a34fa90bf81a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">OCI_EXPORT const otext* OCI_API OCI_SubscriptionGetName </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___ocilib_c_api_datatypes.html#gae28da488be3fc9bbf5ee3cc368b93be4">OCI_Subscription</a> *&#160;</td>
          <td class="paramname"><em>sub</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>#include &lt;ocilib.h&gt;</code></p>

<p>Return the name of the given registered subscription. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sub</td><td>- Subscription handle</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>OCI_ENV_EVENTS flag must be passed to <a class="el" href="group___ocilib_c_api_initialization.html#ga01464863ddd68393106b63fb8cc1ead1" title="Initialize the library. ">OCI_Initialize()</a> to be able to use subscriptions </dd></dl>

<p>Referenced by <a class="el" href="classocilib_1_1_subscription.html#abae63e20c73fdf494c6538bb78559e56">ocilib::Subscription::GetName()</a>.</p>

</div>
</div>
<a class="anchor" id="gaac2b2c3f7bc5e07f230cb4f797f95e8c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">OCI_EXPORT unsigned int OCI_API OCI_SubscriptionGetPort </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___ocilib_c_api_datatypes.html#gae28da488be3fc9bbf5ee3cc368b93be4">OCI_Subscription</a> *&#160;</td>
          <td class="paramname"><em>sub</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>#include &lt;ocilib.h&gt;</code></p>

<p>Return the port used by the notification. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sub</td><td>- Subscription handle</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>OCI_ENV_EVENTS flag must be passed to <a class="el" href="group___ocilib_c_api_initialization.html#ga01464863ddd68393106b63fb8cc1ead1" title="Initialize the library. ">OCI_Initialize()</a> to be able to use subscriptions </dd></dl>

<p>Referenced by <a class="el" href="classocilib_1_1_subscription.html#ae55df645e1a7ae1df185e3da057a1053">ocilib::Subscription::GetPort()</a>.</p>

</div>
</div>
<a class="anchor" id="ga56fb04b8fe1cf961dbab6ee90b3362ca"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">OCI_EXPORT unsigned int OCI_API OCI_SubscriptionGetTimeout </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___ocilib_c_api_datatypes.html#gae28da488be3fc9bbf5ee3cc368b93be4">OCI_Subscription</a> *&#160;</td>
          <td class="paramname"><em>sub</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>#include &lt;ocilib.h&gt;</code></p>

<p>Return the timeout of the given registered subscription. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sub</td><td>- Subscription handle</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>OCI_ENV_EVENTS flag must be passed to <a class="el" href="group___ocilib_c_api_initialization.html#ga01464863ddd68393106b63fb8cc1ead1" title="Initialize the library. ">OCI_Initialize()</a> to be able to use subscriptions </dd></dl>

<p>Referenced by <a class="el" href="classocilib_1_1_subscription.html#a83d352299128fa542985fed08afa645d">ocilib::Subscription::GetTimeout()</a>.</p>

</div>
</div>
<a class="anchor" id="ga748e045e9c97b31e83cd52926ba62509"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">OCI_EXPORT <a class="el" href="group___ocilib_c_api_datatypes.html#ga2135d3b5341ebbaae1f54d62873ecf77">OCI_Connection</a>* OCI_API OCI_SubscriptionGetConnection </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___ocilib_c_api_datatypes.html#gae28da488be3fc9bbf5ee3cc368b93be4">OCI_Subscription</a> *&#160;</td>
          <td class="paramname"><em>sub</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>#include &lt;ocilib.h&gt;</code></p>

<p>Return the connection handle associated with a subscription handle. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sub</td><td>- Subscription handle</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>It may return a NULL handle if the connection used in OCI_SubscriptionRegister has been closed. </dd></dl>

<p>Referenced by <a class="el" href="classocilib_1_1_subscription.html#ab37547d82959a93300707f8c40a57e2d">ocilib::Subscription::GetConnection()</a>.</p>

</div>
</div>
<a class="anchor" id="ga0f5fb0fdd972f5d09a6745b05706ff0f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">OCI_EXPORT unsigned int OCI_API OCI_EventGetType </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___ocilib_c_api_datatypes.html#gadb8a12f3997bef6dc932e75f728efbb7">OCI_Event</a> *&#160;</td>
          <td class="paramname"><em>event</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>#include &lt;ocilib.h&gt;</code></p>

<p>Return the type of event reported by a notification. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">event</td><td>- Event handle</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>The returned value can be one of the following values :</dd></dl>
<ul>
<li>OCI_ENT_STARTUP : a database has been started up</li>
<li>OCI_ENT_SHUTDOWN : a database has been shut down</li>
<li>OCI_ENT_SHUTDOWN_ANY : a database has been shut down (RAC)</li>
<li>OCI_ENT_DROP_DATABASE : a database has been dropped</li>
<li>OCI_ENT_DEREGISTER : the notification is timed out</li>
<li>OCI_ENT_OBJECT_CHANGED : a database object has been modified</li>
</ul>
<dl class="section note"><dt>Note</dt><dd><a class="el" href="group___ocilib_c_api_subscriptions.html#ga3a82c0dc1d0d69506087b81bc717c60c" title="Return the name of the database that generated the event. ">OCI_EventGetDatabase()</a> returns the affected database</dd>
<dd>
OCI_ENV_EVENTS flag must be passed to <a class="el" href="group___ocilib_c_api_initialization.html#ga01464863ddd68393106b63fb8cc1ead1" title="Initialize the library. ">OCI_Initialize()</a> to be able to use subscriptions</dd>
<dd>
<a class="el" href="group___ocilib_c_api_subscriptions.html#gab2986bcdd9e4e10996bec5f7767776ec" title="Return the name of the object that generated the event. ">OCI_EventGetObject()</a> returns the affected object ('schema_name'.'object_name') </dd></dl>

<p>Referenced by <a class="el" href="classocilib_1_1_event.html#a412601315112f24603345fc7dc9061ef">ocilib::Event::GetType()</a>.</p>

</div>
</div>
<a class="anchor" id="ga0bc0106ab06c682f77dd763733573a7d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">OCI_EXPORT unsigned int OCI_API OCI_EventGetOperation </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___ocilib_c_api_datatypes.html#gadb8a12f3997bef6dc932e75f728efbb7">OCI_Event</a> *&#160;</td>
          <td class="paramname"><em>event</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>#include &lt;ocilib.h&gt;</code></p>

<p>Return the type of operation reported by a notification. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">event</td><td>- Event handle</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>This call is only valid when <a class="el" href="group___ocilib_c_api_subscriptions.html#ga0f5fb0fdd972f5d09a6745b05706ff0f" title="Return the type of event reported by a notification. ">OCI_EventGetType()</a> reports the event type OCI_ENT_OBJECT_CHANGED</dd>
<dd>
The returned value can be one of the following values :</dd></dl>
<ul>
<li>OCI_ONT_INSERT : an insert has been performed</li>
<li>OCI_ONT_UPDATE : an update has been performed</li>
<li>OCI_ONT_DELETE : a delete has been performed</li>
<li>OCI_ONT_ALTER : an alter has been performed</li>
<li>OCI_ONT_DROP : a drop has been performed</li>
<li>OCI_ONT_GENERIC : generic undefined action</li>
</ul>
<dl class="section note"><dt>Note</dt><dd><a class="el" href="group___ocilib_c_api_subscriptions.html#ga3a82c0dc1d0d69506087b81bc717c60c" title="Return the name of the database that generated the event. ">OCI_EventGetDatabase()</a> returns the affected database</dd>
<dd>
<a class="el" href="group___ocilib_c_api_subscriptions.html#gab2986bcdd9e4e10996bec5f7767776ec" title="Return the name of the object that generated the event. ">OCI_EventGetObject()</a> returns the affected object ('schema_name'.'object_name')</dd>
<dd>
OCI_ENV_EVENTS flag must be passed to <a class="el" href="group___ocilib_c_api_initialization.html#ga01464863ddd68393106b63fb8cc1ead1" title="Initialize the library. ">OCI_Initialize()</a> to be able to use subscriptions</dd>
<dd>
if OCI_CNT_ROWS is passed to <a class="el" href="group___ocilib_c_api_subscriptions.html#ga78afd31aa61d0ce04c535cd669e58e07" title="Register a notification against the given database. ">OCI_SubscriptionRegister()</a>, the rowid of the altered row can be retrieved with <a class="el" href="group___ocilib_c_api_subscriptions.html#gaef9f191c3e55ce652953da82d7cb0d75" title="Return the rowid of the altered database object row. ">OCI_EventGetRowid()</a> </dd></dl>

<p>Referenced by <a class="el" href="classocilib_1_1_event.html#ae8d1ec68b3c19c437ac94964356c3eca">ocilib::Event::GetObjectEvent()</a>.</p>

</div>
</div>
<a class="anchor" id="ga3a82c0dc1d0d69506087b81bc717c60c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">OCI_EXPORT const otext* OCI_API OCI_EventGetDatabase </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___ocilib_c_api_datatypes.html#gadb8a12f3997bef6dc932e75f728efbb7">OCI_Event</a> *&#160;</td>
          <td class="paramname"><em>event</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>#include &lt;ocilib.h&gt;</code></p>

<p>Return the name of the database that generated the event. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">event</td><td>- Event handle</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>OCI_ENV_EVENTS flag must be passed to <a class="el" href="group___ocilib_c_api_initialization.html#ga01464863ddd68393106b63fb8cc1ead1" title="Initialize the library. ">OCI_Initialize()</a> to be able to use subscriptions </dd></dl>

<p>Referenced by <a class="el" href="classocilib_1_1_event.html#a6c060227178b17fc97b02526e1707c08">ocilib::Event::GetDatabaseName()</a>.</p>

</div>
</div>
<a class="anchor" id="gab2986bcdd9e4e10996bec5f7767776ec"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">OCI_EXPORT const otext* OCI_API OCI_EventGetObject </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___ocilib_c_api_datatypes.html#gadb8a12f3997bef6dc932e75f728efbb7">OCI_Event</a> *&#160;</td>
          <td class="paramname"><em>event</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>#include &lt;ocilib.h&gt;</code></p>

<p>Return the name of the object that generated the event. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">event</td><td>- Event handle</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>OCI_ENV_EVENTS flag must be passed to <a class="el" href="group___ocilib_c_api_initialization.html#ga01464863ddd68393106b63fb8cc1ead1" title="Initialize the library. ">OCI_Initialize()</a> to be able to use subscriptions </dd></dl>

<p>Referenced by <a class="el" href="classocilib_1_1_event.html#a150ab653e087b76fdd9e4ca9a083afc1">ocilib::Event::GetObjectName()</a>.</p>

</div>
</div>
<a class="anchor" id="gaef9f191c3e55ce652953da82d7cb0d75"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">OCI_EXPORT const otext* OCI_API OCI_EventGetRowid </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___ocilib_c_api_datatypes.html#gadb8a12f3997bef6dc932e75f728efbb7">OCI_Event</a> *&#160;</td>
          <td class="paramname"><em>event</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>#include &lt;ocilib.h&gt;</code></p>

<p>Return the rowid of the altered database object row. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">event</td><td>- Event handle</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>OCI_ENV_EVENTS flag must be passed to <a class="el" href="group___ocilib_c_api_initialization.html#ga01464863ddd68393106b63fb8cc1ead1" title="Initialize the library. ">OCI_Initialize()</a> to be able to use subscriptions </dd></dl>

<p>Referenced by <a class="el" href="classocilib_1_1_event.html#a2fa9783b57dfeabaef53ce19f2211575">ocilib::Event::GetRowID()</a>.</p>

</div>
</div>
<a class="anchor" id="ga6a8667ed40a4be1eb47b1a0552791407"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">OCI_EXPORT <a class="el" href="group___ocilib_c_api_datatypes.html#gae28da488be3fc9bbf5ee3cc368b93be4">OCI_Subscription</a>* OCI_API OCI_EventGetSubscription </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___ocilib_c_api_datatypes.html#gadb8a12f3997bef6dc932e75f728efbb7">OCI_Event</a> *&#160;</td>
          <td class="paramname"><em>event</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>#include &lt;ocilib.h&gt;</code></p>

<p>Return the subscription handle that generated this event. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">event</td><td>- Event handle</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>OCI_ENV_EVENTS flag must be passed to <a class="el" href="group___ocilib_c_api_initialization.html#ga01464863ddd68393106b63fb8cc1ead1" title="Initialize the library. ">OCI_Initialize()</a> to be able to use subscriptions </dd></dl>

<p>Referenced by <a class="el" href="classocilib_1_1_event.html#afea9cc576043252bb27ed52b2b13f257">ocilib::Event::GetSubscription()</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated on Mon Mar 21 2016 22:26:37 for OCILIB (C and C++ Driver for Oracle) by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.9.1 </li>
  </ul>
</div>
</body>
</html>
